package com.quan.api.mall;

import com.quan.commons.core.bean.R;
import com.quan.commons.core.biz.support.MyBaseController;
import com.quan.mall.service.MallAdvertiseService;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@AllArgsConstructor
@RestController
@RequestMapping("/api/mall/advertise")
public class MallApiAdvertiseController extends MyBaseController {

    @Autowired
    private MallAdvertiseService mallAdvertiseService;

    /**
     * 广告列表
     * @param identity
     * @return
     */
    @GetMapping("/showAdvertise/{identity}")
    public Object showAdvertise(@PathVariable String identity) {
        return R.ok().put("data", this.mallAdvertiseService.showAdvertise(identity));
    }


}
